package com.wjw.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@TableName("reader_book")
public class ReaderBook {

    @TableId
    private Integer id;
    private Integer rid;
    private Integer bid;
    private Integer status;
    @TableField(fill = FieldFill.INSERT) //插入时填充字段
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date borrowTime;
    @TableField(fill = FieldFill.INSERT_UPDATE) //插入和更新时添加字段
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date returnTime;
    @TableField(exist = false)
    private Reader reader;
    @TableField(exist = false)
    private Book book;
    @TableField(exist = false)
    private String rimage;
    @TableField(exist = false)
    private String bimage;



}
